﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Windows.Forms;
using SharedLib.Helpers;

namespace TracyGUI.View
{
    partial class AboutBoxMain : Form
    {
        public AboutBoxMain()
        {
            InitializeComponent();
            Assembly assembly = Assembly.GetExecutingAssembly();
            this.Text = String.Format(Tracy.TracyFacade.Instance.LanguageManager.GetText("AboutBoxTitle"), AssemblyHelper.GetAssemblyTitle(assembly));
            this.labelProductName.Text = AssemblyHelper.GetAssemblyProduct(assembly);
            this.labelVersion.Text = String.Format(Tracy.TracyFacade.Instance.LanguageManager.GetText("AboutBoxVersion"), AssemblyHelper.GetAssemblyVersion(assembly));
            this.labelCopyright.Text = AssemblyHelper.GetAssemblyCopyright(assembly);
            //this.labelCompanyName.Text = AssemblyCompany;
            this.textBoxDescription.Text = AssemblyHelper.GetAssemblyDescription(assembly);
            
            okButton.Text = Tracy.TracyFacade.Instance.LanguageManager.GetText("OKButtonText");
            linkLabelURL.Text = Tracy.TracyFacade.Instance.LanguageManager.GetText("AboutBoxLink");
        }

        

        private void linkLabelURL_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            System.Diagnostics.Process.Start("http://tracy.codeplex.com");
        }

        private void okButton_Click(object sender, EventArgs e)
        {
            Close();
        }
    }
}
